using System;
using System.Collections.Specialized;

namespace Evaluant.Uss.Common
{
	/// <summary>
	/// Contains informations on a specific attribute
	/// </summary>
	[Serializable]
	public class AttributeDescriptor
	{
		public AttributeDescriptor(string name, Type type)
		{
			_Name = name;
			_Type = type;
			_Constraints = new StringCollection();
		}
		
		protected string _Name;
		public string Name
		{
			get { return _Name; }
			set { _Name = value; }
		}

		protected Type _Type;
		public Type Type
		{
			get { return _Type; }
			set { _Type = value; }
		}

		protected string _Category;
		public string Category
		{
			get { return _Category; }
			set { _Category = value; }
		}

		protected string _Description;
		public string Description
		{
			get { return _Description; }
			set { _Description = value; }
		}

		protected string _DisplayName;
		public string DisplayName
		{
			get { return _DisplayName; }
			set { _DisplayName = value; }
		}

		protected bool _IsReadOnly = false;
		public bool IsReadOny
		{
			get { return _IsReadOnly; }
			set { _IsReadOnly = value; }
		}

		protected bool _IsBrowsable = true;
		public bool IsBrowsable
		{
			get { return _IsBrowsable; }
			set { _IsBrowsable = value; }
		}

		protected object _DefaultValue;
		public object DefaultValue
		{
			get { return _DefaultValue; }
			set { _DefaultValue = value; }
		}

		protected object[] _AllowedValues;
		public object[] AllowedValues
		{
			get { return _AllowedValues; }
			set { _AllowedValues = value; }
		}

		protected StringCollection _Constraints;
		/// <summary>
		/// Represents OPath expressions returning boolean values to be checked
		/// </summary>
		public StringCollection Constraints
		{
			get { return _Constraints; }
		}

	}
}
